include ../makefile.inc

LIB_TARGET= lib/libayoo.a
NEED_DEBUG= -g

INC=-I./include
INC:=${INC} ${INC_MYSQL} 

SRCS= $(wildcard src/*.cpp src/net/*.cpp )
OBJS= $(patsubst src/%.cpp, obj/%.o, ${SRCS} )

$(LIB_TARGET): $(OBJS)
	@echo
	@echo "$(OBJS) ==> $@"
	@$(AR) rc $(LIB_TARGET) $(OBJS)

obj/%.o: src/%.cpp
	g++ -o $@ -c $< $(NEED_DEBUG) $(INC) $(C_FLAGS) 

all: $(LIB_TARGET) 

start:
	mkdir ./lib
	mkdir ./obj
	
test:
	echo $(OBJS)

clean:
	find ./ -name *.o -exec rm -rf {} \;


